<?php
class retrieve_elert_admin extends retrieve_base{

	private $module_display_options 	= array(
		Array("ELERT_DISPLAY", "Display the Elert SignUp Form here")
	);
	/**
	* function produces abstract structure of modules db structure
	*
    * used to generate the table structure required abstract function that passes an abstract
	* representation of the desired table structure to the proper database module which will
	* interpet the abstract and convert it into a valid SQL Create table structure.
	*
	* @return Array list of abstract table definitions for this module
	*/
	function create_table(){
		$tables = array();

		/**
		*  PRESENTATION TABLES
		-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		* Table structure for table 'elert_signup_urls'
		*/
		
		$fields = array(
			array("esurl_identifier"			,"unsigned integer"			,"NOT NULL"	,"auto_increment","key"),
			array("esurl_client"				,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("esurl_user"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("esurl_url"					,"text"						,"NOT NULL"	,"default ''"),
			array("esurl_label"					,"varchar(255)"				,"NOT NULL"	,"default ''")
		);
		
		$primary ="esurl_identifier";
		$tables[count($tables)] = array("elert_signup_urls", $fields, $primary);

		/**
		* Table structure for table 'elert_signup'
		*/
		$fields = array(
			array("esu_identifier"				,"unsigned integer"			,"NOT NULL"	,"auto_increment","key"),
			array("esu_client"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("esu_user"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("esu_section"					,"unsigned integer"			,"NOT NULL"	,"default '0'")
		);
		
		$primary ="esu_identifier";
		$tables[count($tables)] = array("elert_signup", $fields, $primary);

		/**
		* Table structure for table 'elert_sections'
		*/
		$fields = array(
			array("es_identifier"				,"unsigned integer"			,"NOT NULL"	,"auto_increment","key"),
			array("es_client"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("es_label"					,"varchar(255)"				,"NOT NULL"	,"default ''"),
			array("es_set_inheritance"			,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("es_all_locations"			,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("es_date_created"				,"datetime"					,"NOT NULL"	,"default ''")
		);
		
		$primary ="es_identifier";
		$tables[count($tables)] = array("elert_sections", $fields, $primary);

		/**
		*  ADMIN TABLES
		-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
		* Table structure for table 'elert_optinout'
		*/
		$fields = array(
			array("eoio_identifier"				,"unsigned integer"			,"NOT NULL"	,"auto_increment","key"),
			array("eoio_client"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("eoio_label"					,"varchar(255)"				,"NOT NULL"	,"default ''"),
			array("eoio_type"					,"varchar(255)"				,"NOT NULL"	,"default ''"),
			array("eoio_status"					,"unsigned small integer"	,"NOT NULL"	,"default '0'")
		);
		
		$primary ="eoio_identifier";
		$tables[count($tables)] = array("elert_optinout", $fields, $primary);

		/**
		* Table structure for table 'elert_optin_list'
		*/
		$fields = array(
			array("eoil_identifier"				,"unsigned integer"			,"NOT NULL"	,"auto_increment","key"),
			array("eoil_client"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("eoil_user"					,"unsigned integer"			,"NOT NULL"	,"default '0'"),
			array("eoil_list"					,"unsigned integer"			,"NOT NULL"	,"default '0'")
		);
		
		$primary ="eoil_identifier";
		$tables[count($tables)] = array("elert_optin_list", $fields, $primary);
		return $tables;
	}
	
}
?>